<?php
//控制器基类
//暂时没有加入模板解析类,用到的时候可以自行加入
abstract class base{
	protected $app_url;
	protected $temp;
	protected $templet;
	
	
	public function __construct(){
		$this->app_url = 'http://apps.xiaonei.com/hohoapps/';
		$this->templet = view::getInstance();
	}

	
	public function __set($name,$value){
		echo 'setting'.$name.'to'.$value;
		$this->$name = $value; 
	}
	
	public function __get($name){
		echo 'getting'.$name;
		return $this->$name;
	}
	
	public function assign($tplvar,$value){
		if (!empty($tplvar) && !empty($value)) {
			$this->temp[$tplvar] = $value;
		}else {
			exit('missing values!');
		}
	}
	
	public function display($filename){
		$this->templet->getTpl($filename);
	}
	
	abstract public function run();
}